package com.pgeneral.user.management.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.pgeneral.user.management.dao.SopRoleScopeMapper;
import com.pgeneral.user.management.entity.SopRoleScope;
import com.pgeneral.user.management.service.SopRoleScopeService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
*@author 龙
*@create 2020/7/2 14:18
*/
@Service
public class SopRoleScopeServiceImpl implements SopRoleScopeService {

    @Resource
    private SopRoleScopeMapper soprolescopeMapper;


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int insert(List<SopRoleScope> sopRoleScopes) {
        return soprolescopeMapper.insert(sopRoleScopes);
    }

    @Override
    public List<SopRoleScope> getSopRoleScopeTable(SopRoleScope sopRoleScope) {
        return soprolescopeMapper.getSopRoleScopeTable(sopRoleScope);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateSopRoleScopeTable(List<SopRoleScope> sopRoleScopes) {
        return soprolescopeMapper.updateSopRoleScopeTable(sopRoleScopes);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateIsDeletefromSopRoleScopeTable(List<String> ids) {
        return soprolescopeMapper.updateIsDeletefromSopRoleScopeTable(ids);
    }
}
